﻿using Furion;
using Furion.Logging;
using Furion.TaskScheduler;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Err.DatabaseLogging
{
    public class Startup : AppStartup
    {
        /// <summary>
        /// 配置服务
        /// </summary>
        /// <param name="services"></param>
        public async void ConfigureServices(IServiceCollection services)
        {
            var logname = $"log22.log";
            services.AddFileLogging(logname);
            //SqlSugarLog日志记录
            services.AddDatabaseLogging<DatabaseLogWriter>();
            //添加任务调度框架
            services.AddTaskScheduler();

            SpareTime.Start("Test");
            Log.Error("测试Log");
        }
    }
}
